home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / comm / mail / YAMscripts.lha / DeleteRead.rexx < prev    next >
OS/2 REXX Batch file  |  1996-12-04  |  581b  |  24 lines

  1. /* DeleteRead.rexx - Deletes read messages from current folder */
  2. options results
  3. call addlib('rexxsupport.library',0,-30,0)
  4.  
  5. delete_these='ORSS'    /* O=Old, R=Replied, N=New, U=Unread, S=Sent */
  6.      rem_del='NO'    /* If set to yes, messages will be removed automatically */
  7.  
  8. address 'YAM'
  9. 'GetFolderInfo Max'
  10. n=result
  11. do m=0 to n-1
  12.   'SetMail' m
  13.   'GetMailInfo Status'
  14.   if pos(result,delete_these)>0 then 
  15.     if upper(rem_del)='YES' then do
  16.       'GetMailInfo File'
  17.       call delete(result)
  18.       end
  19.     else
  20.       'MailDelete'
  21. end
  22. if upper(rem_del)='YES' then 'MailUpdate'
  23. exit
  24.